package com.eis.persist.dao;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.eis.exception.EisSysException;
import com.eis.persist.model.bizsystem.PersistBizSystem;
import com.eis.persist.model.bizsystem.PersistConnectorConfigure;

@Transactional
public interface BizSystemDAO {
	public List<PersistBizSystem> getAllBizSystems();
	
	public PersistBizSystem getBizSystem(int id);
	
	public List<PersistConnectorConfigure> getConnectorConfigs(int bizSystemId);
	
	public PersistConnectorConfigure getConnectorConfig(int configId);
	
	/**
	 * insert or update a bizSystem<br/>
	 * if the id of the bizSystem was 0, will do save operation.<br/>
	 * others will do update operation.
	 * 
	 * @param bizSystem
	 * @return
	 * @throws EisSysException 
	 */
	public boolean saveBizSystem(PersistBizSystem bizSystem) throws EisSysException;
	
	public boolean saveConnectorConfigure(PersistConnectorConfigure connectorConfigure) throws EisSysException;
	
	public boolean deleteConnectorConfigure(int configId) throws EisSysException;
	
	public PersistConnectorConfigure getFunctionConfig(String functionId);
}
